.class public Lcom/estrongs/fs/impl/usb/fs/ntfs/q;
.super Ljava/lang/Object;
.source "NTFSFileSystem.java"

# interfaces
.implements Les/c50;


# instance fields
.field private final a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

.field private b:Les/e50;

.field private c:Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

.field private d:Ljava/lang/String;


# direct methods
.method public constructor <init>(Ljava/lang/String;Les/a50;Ljava/nio/ByteBuffer;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/impl/usb/UsbFsException;
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-direct {v0, p1, p2, p3}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;-><init>(Ljava/lang/String;Les/a50;Ljava/nio/ByteBuffer;)V

    iput-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    .line 3
    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->d:Ljava/lang/String;

    .line 4
    iget-object p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->c:Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    if-nez p1, :cond_0

    .line 5
    new-instance p1, Lcom/estrongs/fs/impl/usb/fs/ntfs/n;

    iget-object p2, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-virtual {p2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->d()Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    move-result-object p2

    invoke-direct {p1, p0, p2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/n;-><init>(Lcom/estrongs/fs/impl/usb/fs/ntfs/q;Lcom/estrongs/fs/impl/usb/fs/ntfs/l;)V

    const-string p2, "."

    invoke-virtual {p1, p2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/n;->a(Ljava/lang/String;)Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->c:Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    .line 6
    invoke-interface {p1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/g;->getDirectory()Lcom/estrongs/fs/impl/usb/fs/ntfs/f;

    move-result-object p1

    check-cast p1, Les/e50;

    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->b:Les/e50;

    :cond_0
    return-void
.end method

.method public static a([B)Z
    .locals 0

    .line 9
    invoke-static {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a([B)Z

    move-result p0

    return p0
.end method


# virtual methods
.method public a()J
    .locals 9

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->c()Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    move-result-object v0

    const-wide/16 v1, 0x6

    invoke-virtual {v0, v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/m;->a(J)Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    move-result-object v3

    const/16 v0, 0x80

    const/4 v1, 0x0

    .line 2
    invoke-virtual {v3, v0, v1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/l;->b(ILjava/lang/String;)J

    move-result-wide v0

    long-to-int v1, v0

    .line 3
    new-array v0, v1, [B

    const-wide/16 v4, 0x0

    const/4 v7, 0x0

    move-object v6, v0

    move v8, v1

    .line 4
    invoke-virtual/range {v3 .. v8}, Lcom/estrongs/fs/impl/usb/fs/ntfs/l;->a(J[BII)V

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_0
    if-ge v3, v1, :cond_2

    .line 5
    aget-byte v5, v0, v3

    const/4 v6, 0x0

    :goto_1
    const/16 v7, 0x8

    if-ge v6, v7, :cond_1

    and-int/lit8 v7, v5, 0x1

    if-eqz v7, :cond_0

    add-int/lit8 v4, v4, 0x1

    :cond_0
    shr-int/lit8 v5, v5, 0x1

    int-to-byte v5, v5

    add-int/lit8 v6, v6, 0x1

    goto :goto_1

    :cond_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_2
    int-to-long v0, v4

    .line 6
    iget-object v2, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-virtual {v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b()I

    move-result v2

    int-to-long v2, v2

    mul-long v0, v0, v2

    .line 7
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->d()J

    move-result-wide v2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    sub-long/2addr v2, v0

    return-wide v2

    :catch_0
    move-exception v0

    .line 8
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const-wide/16 v0, -0x1

    return-wide v0
.end method

.method public b()Les/e50;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->b:Les/e50;

    return-object v0
.end method

.method public c()Ljava/lang/String;
    .locals 6

    const-string v0, "UsbStorage"

    .line 1
    :try_start_0
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->e()Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    move-result-object v1

    invoke-interface {v1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/g;->getDirectory()Lcom/estrongs/fs/impl/usb/fs/ntfs/f;

    move-result-object v1

    const-string v2, "$Volume"

    invoke-interface {v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/f;->a(Ljava/lang/String;)Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    move-result-object v1

    check-cast v1, Lcom/estrongs/fs/impl/usb/fs/ntfs/o;

    if-nez v1, :cond_0

    return-object v0

    .line 2
    :cond_0
    invoke-virtual {v1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/o;->b()Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    move-result-object v1

    const/16 v2, 0x60

    invoke-virtual {v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/l;->m(I)Les/t50;

    move-result-object v1

    .line 3
    instance-of v2, v1, Les/v50;

    if-eqz v2, :cond_1

    .line 4
    check-cast v1, Les/v50;

    .line 5
    invoke-virtual {v1}, Les/v50;->k()I

    move-result v2

    new-array v3, v2, [B

    if-lez v2, :cond_1

    .line 6
    invoke-virtual {v1}, Les/v50;->l()I

    move-result v4

    const/4 v5, 0x0

    invoke-virtual {v1, v4, v3, v5, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/s;->a(I[BII)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 7
    :try_start_1
    new-instance v1, Ljava/lang/String;

    const-string v2, "UTF-16LE"

    invoke-direct {v1, v3, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_1
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    return-object v1

    :catch_0
    move-exception v1

    .line 8
    :try_start_2
    new-instance v2, Ljava/lang/IllegalStateException;

    const-string v3, "UTF-16LE charset missing from JRE"

    invoke-direct {v2, v3, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v2
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    :catch_1
    move-exception v1

    .line 9
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1
    return-object v0
.end method

.method public d()J
    .locals 4

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->c()Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    move-result-object v0

    const-wide/16 v1, 0x6

    invoke-virtual {v0, v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/m;->a(J)Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    move-result-object v0

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/l;->j()Lcom/estrongs/fs/impl/usb/fs/ntfs/k;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/k;->o()J

    move-result-wide v0

    const-wide/16 v2, 0x8

    mul-long v0, v0, v2

    .line 3
    iget-object v2, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->a:Lcom/estrongs/fs/impl/usb/fs/ntfs/t;

    invoke-virtual {v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b()I

    move-result v2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    int-to-long v2, v2

    mul-long v0, v0, v2

    return-wide v0

    :catch_0
    move-exception v0

    .line 4
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const-wide/16 v0, -0x1

    return-wide v0
.end method

.method public e()Lcom/estrongs/fs/impl/usb/fs/ntfs/g;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/q;->c:Lcom/estrongs/fs/impl/usb/fs/ntfs/g;

    return-object v0
.end method
